package net.xiaosaguo.mymall.search.vo;

import lombok.Data;

import java.util.List;

/**
 * description: 检索参数
 *
 * @author xiaosaguo
 * @date 2020/06/27
 */
@Data
public class SearchParam {
    /**
     * 全文匹配关键字
     */
    private String keyword;

    /**
     * 三级分类ID
     */
    private Long catalog3Id;

    /**
     * 排序条件，有以下三种，约定一次请求中只能按照一种方式排序
     * 1. 按销量
     * -  saleCount_asc
     * -  saleCount_desc
     * 2. 按价格
     * -  skuPrice_asc
     * -  skuPrice_desc
     * 3. 综合排序（热度评分）
     * -  hotScore_asc
     * -  hotScore_desc
     */
    private String sort;

    /**
     * 过滤条件
     * hasStock（是否有货）、skuPrice区间、brandId、catalog3Id、attrs
     * hasStock=0/1
     * skuPrice=1_500/_500/500_
     * brandId=1&brandId=2
     * attrs=1_安卓:苹果:others
     */
    private Integer hasStock;
    private String skuPrice;
    private List<Long> brandId;
    private List<String> attrs;

    private Integer pageNum = 1;
}
